package com.water.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author wsj
 * @version 1.0
 * @description: TODO
 * @date 2022/1/8 15:42
 */
@Component
public class Team {
    @Value("5567")
    private Integer id;

    private String name;

    private String location;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }
    @Value("雄鹿")
    public void setName(String name) {
        this.name = name;
    }

    public String getLocation() {
        return location;
    }

    @Value("沃尔密集")
    public void setLocation(String location) {
        this.location = location;
    }

    @Override
    public String toString() {
        return "Team{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", location='" + location + '\'' +
                '}';
    }

    public Team(Integer id, String name, String location) {
        this.id = id;
        this.name = name;
        this.location = location;
        System.out.println("编号："+id+",球队名字："+name+",位置："+location);
    }

    public Team(){
        System.out.println("编号："+id+",球队名字："+name+",位置："+location);
    }

    public void init(){
        System.out.println("======Team初始化=========");
    }

    public void destroy(){
        System.out.println("======Team销毁=========");
    }
}
